<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
         function getDate(){
         var dt = new Date();
         var year = dt.getFullYear(); 
         var month = dt.getMonth () + 1 ;
         var date = dt.getDate();
         var hour = dt.getHours();      
         var minutes = dt.getMinutes();
         var second = dt.getSeconds();
         return year + "年" + month + "月" + date + "日" + hour + "：" + minutes + "：" +second + "：";
         }
         console.log(getDate());
    </script>
</body>
</html>